#pragma once
#include "MyMath.hpp"

class Framebuffer {
public:
    Framebuffer(int width, int height);
    ~Framebuffer();

    Framebuffer(const Framebuffer&) = delete;
    Framebuffer& operator=(const Framebuffer&) = delete;

    void ClearColor(const Vector4<float>& color);
    void ClearDepth(float depth);

    unsigned char* GetColorBuffer() { return colorBuffer; }
    float* GetDepthBuffer() { return depthBuffer; }

    void SetColorPixel(int col, int row, const Vector4<float> &color);
    void SetDepthPixel(int col, int row, float depth);

    int GetWidth() const { return width; }
    int GetHeight() const { return height; }

    void DrawPixel(int col, int row, const Vector4<float>& color, float depth);

private:
    int width;
    int height;

    unsigned char* colorBuffer; 
    float* depthBuffer;
};

